package com.atguigu.springcloud.service.impl;

import com.atguigu.springcloud.dao.StorageDao;
import com.atguigu.springcloud.entities.CommonResult;
import com.atguigu.springcloud.service.StorageService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @PROJECT_NAME: cloud2020
 * @DESCRIPTION: 库存业务实现类
 * @Author: csc
 * @DATE: 2023/4/6 13:47
 */
@Service
public class StorageServiceImpl implements StorageService {

    private static  final Logger logger = LoggerFactory.getLogger(StorageServiceImpl.class);

    @Resource
    private StorageDao storageDao;

    @Override
    public void decrease(Long productId, Integer count) {
        logger.info("---->storage-service中扣减库存开始");
         storageDao.decrease(productId,count);
        logger.info("---->storage-service中扣减库存结束了哈哈哈---");
    }




}
